<?php
/*
+--------------------------------------------------------------------------
|   AffiliStore 2
|   ========================================
|   Web: http://www.affilistore.com
|   Email: admin (at) affilistore (dot) com
|	License Type: AffiliStore 2 is NOT open source software and limitations apply 
|   Licence Info: Visit AffiliStore website and click on 'Licence'
+--------------------------------------------------------------------------
*/
if (eregi(".inc.php",$HTTP_SERVER_VARS['PHP_SELF']) || eregi(".inc.php",$_SERVER['PHP_SELF'])) {
	echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>";
	exit;
}



// popular products listing
$getFeature = mysql_query("SELECT merchantProdID, dbProdID, prodDB, prodName, prodImageURL FROM affiliSt_products1 ORDER BY RAND() DESC LIMIT 0, 1");
$featureList = mysql_fetch_assoc($getFeature);

$box_content = new XTemplate ("skins/".$configSkin['value']."/styleTemplates/featureproducts.tpl");

        do {
					// use merchant product ids
					if ($navOpt[12] == 1) {
					$theprodID = $featureList['merchantProdID'];
					} else {
					$theprodID = $featureList['dbProdID'];
					}
		

			
					if ($navOpt[7] == 1) {
					// html perma
					$box_content->assign("PRODLINK",$installDir['value'].'product/'.$featureList['prodDB'].'/'.$theprodID.'/'.urltxt($featureList['prodName']).'.html');
					$box_content->assign("IMAGELINK",$installDir['value'].'img/'.$featureList['prodDB'].'/'.$featureList['dbProdID'].'.jpg');
					} else {
					// php link
					$box_content->assign("PRODLINK",$installDir['value'].'index.php?case=product&proddb='.$featureList['prodDB'].'&pid='.$theprodID);
					$box_content->assign("IMAGELINK",$featureList['prodImageURL']);
					}
					$box_content->assign("NAME",$featureList['prodName']);
					$box_content->parse("featureprod.li");
		
        } while ($featureList = mysql_fetch_assoc($getFeature));

$box_content->assign("DATA", "Featured Product");
$box_content->assign("SKIN",$configSkin['value']);
$box_content->parse("featureprod");
$box_content = $box_content->text("featureprod");
?>